import request from '@/utils/request'

export function getTopData(query) {
  return request({
    url: '/homePage/list',
    method: 'post',
    // data: query
  })
}


export function getChartsData(query) {
  return request({
    url: `/homePage/listDetail?type=${query}`,
    method: 'post',
    data: {
      type:query
    }
  })
}

/**
 *查询我的派送 && 待办列表
 * @param query
 * @param page
 */
export function getTableListApi(query,page) {
  const data = Object.assign(query,page);
  //delete data.date;
  delete data.total;
  return request({
    url: '/zlg-task/list',
    method: 'POST',
    data,
  })
}

/**
 *催办
 * @param taskId
 */
export function setTodoApi(taskId) {
  return request({
    url: `/zlg-task/setTodo/${taskId}`,
    method: 'get',
  })
}
